<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>静待花开</title><meta name="author" content="brad 随风起舞"><meta name="copyright" content="brad 随风起舞"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="有些事情需要一辈子的沉淀">
<meta property="og:type" content="website">
<meta property="og:title" content="静待花开">
<meta property="og:url" content="https://zhangbo4881820.gitee.io/myblog/index.html">
<meta property="og:site_name" content="静待花开">
<meta property="og:description" content="有些事情需要一辈子的沉淀">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png">
<meta property="article:author" content="brad 随风起舞">
<meta property="article:tag" content="java,编程,生活">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png"><link rel="shortcut icon" href="/myblog/img/favicon.png"><link rel="canonical" href="https://zhangbo4881820.gitee.io/myblog/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/myblog/css/index.css"><link rel="stylesheet" href="/myblog/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="/myblog/css/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/myblog/',
  algolia: undefined,
  localSearch: {"path":"/myblog/search.xml","preload":false,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容：${query}","hits_stats":"共找到 ${hits} 篇文章"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '静待花开',
  isPost: false,
  isHome: true,
  isHighlightShrink: true,
  isToc: false,
  postUpdate: '2023-09-15 15:58:17'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
    win.getCSS = (url,id = false) => new Promise((resolve, reject) => {
      const link = document.createElement('link')
      link.rel = 'stylesheet'
      link.href = url
      if (id) link.id = id
      link.onerror = reject
      link.onload = link.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        link.onload = link.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(link)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 7.0.0-rc2"><link rel="alternate" href="/myblog/atom.xml" title="静待花开" type="application/atom+xml">
</head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/myblog/archives/"><div class="headline">文章</div><div class="length-num">57</div></a><a href="/myblog/tags/"><div class="headline">标签</div><div class="length-num">20</div></a><a href="/myblog/categories/"><div class="headline">分类</div><div class="length-num">25</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/myblog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 分享</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/myblog/Gallery/"><i class="fa-fw fas fa-images"></i><span> 照片</span></a></li><li><a class="site-page child" href="/myblog/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/myblog/movies/"><i class="fa-fw fas fa-video"></i><span> 视频</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/myblog/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="not-top-img" id="page-header"><nav id="nav"><span id="blog-info"><a href="/myblog/" title="静待花开"><span class="site-name">静待花开</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/myblog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 分享</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/myblog/Gallery/"><i class="fa-fw fas fa-images"></i><span> 照片</span></a></li><li><a class="site-page child" href="/myblog/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/myblog/movies/"><i class="fa-fw fas fa-video"></i><span> 视频</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/myblog/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/15695/" title="jenkins（1）">jenkins（1）</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-09-14T02:17:44.000Z" title="发表于 2023-09-14 10:17:44">2023-09-14</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/jenkins/">jenkins</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/jenkins/">jenkins</a></span></div><div class="content">jenkins插件管理首先第一步换成国内插件地址：
Jenkins-&gt;Manage Jenkins-&gt;Manage Plugins，点击Available
这样做是为了把Jenkins官方的插件列表下载到本地，接着修改地址文件，替换为国内插件地址
cd /var/lib/jenkins/updatessed -i &#x27;s/http:\/\/updates.jenkins-ci.org\/download/https:\/\/mirrors.tuna.tsinghua.edu.cn\/jenkins/g&#x27; default.jsonsed -i &#x27;s/http:\/\/www.google.com/https:\/\/www.baidu.com/g&#x27; default.json

最后，Manage Plugins点击Advanced，把Update Site改为国内插件下载地址

[https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json]

Submit ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/22012/" title="wsl的Ubuntu子系统（1）">wsl的Ubuntu子系统（1）</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-09-13T08:42:19.000Z" title="发表于 2023-09-13 16:42:19">2023-09-13</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/linux/">linux</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/linux/">linux</a></span></div><div class="content">windows上运行wsl失败解决方法是，使用管理员运行CMD， 输入命令： netsh winsock reset然后就可以输入wsl运行子系统了。
ubuntu卸载java先检查是否安装，命令：dpkg --list | grep -i jdk移除openjdk包，命令：apt-get purge openjdk*卸载 OpenJDK 相关包，命令：apt-get purge icedtea-* openjdk-*再次检查是否卸载成功，命令：dpkg --list | grep -i jdk
查看文件安装位置
update-alternatives –list java

多版本java请注意，安装Java 8后，您可以使用update-alternatives命令来设置默认的Java版本。例如，如果您希望将Java 8设置为默认版本，可以运行以下命令：
sudo update-alternatives –config java
命令替换


命令1
命令2



Systemd command
Sysvinit command


systemctl start service_ ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/30302/" title="effective-java-(接口优于抽象类)">effective-java-(接口优于抽象类)</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-09-12T08:12:48.000Z" title="发表于 2023-09-12 16:12:48">2023-09-12</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/java/">java</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/java/">java</a></span></div><div class="content">首先,父类必须准确的说明所有方法的重写带来的影响,也就是说该类必须文档化他自己使用的可重写的方法.对于每一个public 或 protect 方法,文档必须指出该方法调用的哪些可重写方法,以什么顺序进行,以及每个调用的结果对后续处理的影响.总而言之，为继承而去设计一个类是非常困难的，你必须文档化所有自使用模式的方法。
接口优于抽象类他两的一些共同机制是允许多实现。自从java8接口支持默认实现，这两种机制就都可以允许你向一些方法提供实现。他们间的主要不同是，被抽象类定义的实现，这个类必须是严格的抽象类，因为java仅允许单继承，所以这种对抽象类的限制严格限制了他们作为类型定义的的使用。任何类都被允许实现一个接口，不管这个类处于类的何种层次。
现有的类通过实现一个接口可以很容易的改进。你需要的只是把接口未实现的方法添加进去实现。例如很多类通过实现Comparable,Iterable,AutoCloseable,当接口方法被加入到实现类，就能获得相应的功能改进。一般来说不能通过继承一个抽象类来获得改进。如果您想让两个类扩展同一个抽象类，则必须将它放在类型层次的高处，其中它是两个类的祖先。 ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/9473/" title="effective-java(创建和销毁对象--组合的形式优于继承)">effective-java(创建和销毁对象--组合的形式优于继承)</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-09-11T08:23:19.000Z" title="发表于 2023-09-11 16:23:19">2023-09-11</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/java/">java</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/java/">java</a></span></div><div class="content">组合的形式优于继承为了达到代码重复使用的目的,继承是一种有力的方式，但是这并不总是最好的方式去使得代码重复使用。使用不当的话，将会使得软件变得脆弱不堪。
在一个包中子类，父类的实现是处于相同程序的控制下,这样的话去使用继承的话是安全的。在扩展类专门为设计，文档化而扩展的时候使用继承也是安全的,不像方法调用，继承是违反封装的
换句话说，子类实现细节，依赖父类的属性，函数方法。父类的实现可能随着版本的迭代而改变，如果这样的事情发生的话，那么子类有可能被破坏，即使父类的代码不会接触子类。
结论是：子类必须和父类一起演进，除非父类的作者有专门的为继承目的的做了相应的文档和设计。
举例说明：不合适的使用继承
public class InstrumentedHashSet&lt;E&gt; extends HashSet&lt;E&gt; &#123;// The number of attempted element insertionsprivate int addCount = 0;public InstrumentedHashSet() &#123;&#125;public Instru ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/16107/" title="Hello World">Hello World</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-09-07T09:44:01.910Z" title="发表于 2023-09-07 17:44:01">2023-09-07</time></span></div><div class="content">Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post$ hexo new &quot;My New Post&quot;

More info: Writing
Run server$ hexo server

More info: Server
Generate static files$ hexo generate

More info: Generating
Deploy to remote sites$ hexo deploy

More info: Deployment
</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/12326/" title="杂谈">杂谈</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-08-19T14:14:27.000Z" title="发表于 2023-08-19 22:14:27">2023-08-19</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/%E6%9D%82%E8%B0%88/">杂谈</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/%E6%9D%82%E8%B0%88/">杂谈</a></span></div><div class="content">&emsp;&emsp; 使用hexo写博客是很多年前的事情了,今天周末闲来无事,浏览了一下之前写过的博客,顿时被回忆填满.
还记得那个时候的我特别的迷茫,没有目标,没有方向,完全对未来没有任何期待的那种.
只知道告诉自己别闲着,每天去学习,去充电,去运动,想不到未来,就过好每一天,把每一天的学习任务完成掉,其他的都不去管他了.
如今,我在长沙安家落户,娶妻生子. 我也不知不觉步入中年,需要面对的是越来越严峻,越来越内卷的就业环境.
不过这一次,我没有恐惧,没有不知所措,我好像在认知上成熟了一些,对未知,风险有了更强的心理去面对.
我想我需要做的还是认认真真过好每一天,多去学习,多去了解这个世界,这也是我现在喜欢的生活方式.
无论未来如何,我将无惧.
</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/36057/" title="docker开发">docker开发</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-12-20T08:07:49.000Z" title="发表于 2019-12-20 16:07:49">2019-12-20</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/docker/">docker</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/%E5%AE%B9%E5%99%A8/">容器</a></span></div><div class="content">VM转换成容器首先把VM分割为两块:

本地VM:VM磁盘镜像继续存在并且VM在你的计算机上执行

远程VM:VM磁盘镜像储存并且VM在其他地方执行


VM这两部分的原则是相同的:从文件系统获得tar包并且添加tar包文件添加到暂存镜像中.
将ADD Dockerfile命令（与同级命令COPY不同）与TAR文件（以及gzip压缩文件和其他类似文件类型）放置在这样的镜像中时会解压缩。
暂存镜像是可以在其之上构建的零字节伪镜像。通常，在需要使用Dockerfile复制（或添加）完整文件系统的情况下使用它。
接下来要做三件事:

安装qemu-nbd工具(作为Ubuntu上qemu-utils软件包的一部分提供)

识别到你VM磁盘镜像的路径

关闭虚拟机


如果您的VM磁盘映像为.vdi或.vmdk格式，则此技术应能很好地工作。其他格式可能会遇到喜忧参半的情况。以下代码演示了如何将VM文件转换为虚拟磁盘，从而可以从中复制所有文件。

设置变量指向你VM磁盘镜像VMDISK&#x3D;”$HOME&#x2F;VirtualBox VMs&#x2F;myvm&#x2F;myvm.vdi” ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/46420/" title="docker结构">docker结构</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-12-18T10:05:47.000Z" title="发表于 2019-12-18 18:05:47">2019-12-18</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/docker/">docker</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/%E5%AE%B9%E5%99%A8/">容器</a></span></div><div class="content">你机器上的docker分为两部分:一个事带有RESTful API的守护线程(daemon)和一个和daemon联系的客户端.下图展示了运行docker客户端和守护线程(daemon)

RESTful API使用标准的HTTP请求方式例如get,post,delete,等等.

您调用Docker客户端以从守护程序获取信息或向守护程序提供指令；守护程序是一个服务器，它使用HTTP协议接收请求并从客户端返回响应。反过来，它将使用HTTP协议向其他服务发出发送和接收镜像的请求.服务器从命令行客户端或任何其他被授权的连接去接收请求.守护程序也负责在后台保护你的镜像和容器,然后客户端扮演的是在你和RESTful API之间的中间人

私有Docker注册表是一项存储Docker镜像的服务。可以从具有相关访问权限的任何Docker守护程序请求这些文件。该注册表位于内部网络上，不能公开访问，因此被视为私有注册表。
您的主机通常将位于专用网络上。如果需要，Docker守护程序将调出互联网以检索镜像。
Docker Hub是由Docker Inc.运行的公共注册表。互联网上也可以存在其他公共注册表， ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/20082/" title="CSS01">CSS01</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-12-16T03:13:11.000Z" title="发表于 2019-12-16 11:13:11">2019-12-16</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/CSS/">CSS</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/%E5%89%8D%E7%AB%AF%E7%9F%A5%E8%AF%86/">前端知识</a></span></div><div class="content">CSS基础编写规则h1 &#123; color: green; &#125; 
p &#123; font-size: large; font-family: sans-serif; &#125;

第一条语句选择所有h1标签,使其样式颜色变为绿色
第二条语句选择所有P标签,改变字体大小,字体.
选择标签写在大括号外,属性之间分号隔离,属性key和值之间用:分割. 属性体写在大括号内.
优先级如果你没有写任何的样式代码,那么web页会继承浏览器的内部样式.我们称为默认渲染.
优先级从高到低如下:

用户读者的导入important

开发者的导入important

开发者复写的

用户读者复写的

浏览器默认的


选择器决定冲突胜出者在两个样式冲突的规则中,选择器指定的越明确的将会胜出.
如果你不想CSS被覆盖,那么你可以加入!importance如下:
p &#123;color: blue !important;&#125;

这样的话,在开发者样式级别下无法被覆盖.但是用户级别下可以用!important覆盖该语句
规则顺序基本就是最后的那个胜出!
&lt;style&gt ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/44091/" title="nginx小操作">nginx小操作</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-12-13T06:10:20.000Z" title="发表于 2019-12-13 14:10:20">2019-12-13</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/nginx/">nginx</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/%E5%B0%8F%E6%93%8D%E4%BD%9C/">小操作</a></span></div><div class="content">安装nginx
安装 gcc gcc 是用来编译下载下来的 nginx 源码
 yum install gcc-c++


安装 pcre 和 pcre-develPCRE(Perl Compatible Regular Expressions) 是一个 Perl 库，包括 perl 兼容的正则表达式库。nginx 的 http 模块使用 pcre 来解析正则表达式，pcre-devel 是使用 pcre 开发的一个二次开发库。
 yum install -y pcre pcre-devel


安装 zlib zlib 提供了很多压缩和解方式，nginx 需要 zlib 对 http 进行 gzip
 yum install -y zlib zlib-devel


安装 openssl openssl 是一个安全套接字层密码库，nginx 要支持 https，需要使用 openssl
 yum install -y openssl openssl-devel


下载 nginx 
 wget http://nginx.org/download/nginx-1.14.0.tar.g ...</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span><a class="page-number" href="/myblog/page/2/#content-inner">2</a><span class="space">&hellip;</span><a class="page-number" href="/myblog/page/6/#content-inner">6</a><a class="extend next" rel="next" href="/myblog/page/2/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="this.onerror=null;this.src='/myblog/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">brad 随风起舞</div><div class="author-info__description">有些事情需要一辈子的沉淀</div></div><div class="card-info-data site-data is-center"><a href="/myblog/archives/"><div class="headline">文章</div><div class="length-num">57</div></a><a href="/myblog/tags/"><div class="headline">标签</div><div class="length-num">20</div></a><a href="/myblog/categories/"><div class="headline">分类</div><div class="length-num">25</div></a></div><a id="card-info-btn" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/xxxxx" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:xxxxxx@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/myblog/posts/15695/" title="jenkins（1）">jenkins（1）</a><time datetime="2023-09-14T02:17:44.000Z" title="发表于 2023-09-14 10:17:44">2023-09-14</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/myblog/posts/22012/" title="wsl的Ubuntu子系统（1）">wsl的Ubuntu子系统（1）</a><time datetime="2023-09-13T08:42:19.000Z" title="发表于 2023-09-13 16:42:19">2023-09-13</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/myblog/posts/30302/" title="effective-java-(接口优于抽象类)">effective-java-(接口优于抽象类)</a><time datetime="2023-09-12T08:12:48.000Z" title="发表于 2023-09-12 16:12:48">2023-09-12</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/myblog/posts/9473/" title="effective-java(创建和销毁对象--组合的形式优于继承)">effective-java(创建和销毁对象--组合的形式优于继承)</a><time datetime="2023-09-11T08:23:19.000Z" title="发表于 2023-09-11 16:23:19">2023-09-11</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/myblog/posts/16107/" title="Hello World">Hello World</a><time datetime="2023-09-07T09:44:01.910Z" title="发表于 2023-09-07 17:44:01">2023-09-07</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            <a class="card-more-btn" href="/myblog/categories/" title="查看更多">
    <i class="fas fa-angle-right"></i></a>
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/CSS/"><span class="card-category-list-name">CSS</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/Docker/"><span class="card-category-list-name">Docker</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/HTML/"><span class="card-category-list-name">HTML</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/JQuery/"><span class="card-category-list-name">JQuery</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/RabbitMQ/"><span class="card-category-list-name">RabbitMQ</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/docker/"><span class="card-category-list-name">docker</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/git/"><span class="card-category-list-name">git</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/java/"><span class="card-category-list-name">java</span><span class="card-category-list-count">5</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/myblog/tags/%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B7%A5%E5%85%B7/" style="font-size: 1.3em; color: #99a1ac">项目管理工具</a> <a href="/myblog/tags/%E5%85%AC%E8%80%83/" style="font-size: 1.1em; color: #999">公考</a> <a href="/myblog/tags/%E6%9D%82%E8%B0%88/" style="font-size: 1.1em; color: #999">杂谈</a> <a href="/myblog/tags/Docker/" style="font-size: 1.1em; color: #999">Docker</a> <a href="/myblog/tags/%E6%B6%88%E6%81%AF%E4%B8%AD%E9%97%B4%E4%BB%B6/" style="font-size: 1.2em; color: #999da3">消息中间件</a> <a href="/myblog/tags/springCloud/" style="font-size: 1.2em; color: #999da3">springCloud</a> <a href="/myblog/tags/%E5%AE%B9%E5%99%A8/" style="font-size: 1.2em; color: #999da3">容器</a> <a href="/myblog/tags/jenkins/" style="font-size: 1.1em; color: #999">jenkins</a> <a href="/myblog/tags/mysql/" style="font-size: 1.3em; color: #99a1ac">mysql</a> <a href="/myblog/tags/%E5%B0%8F%E6%93%8D%E4%BD%9C/" style="font-size: 1.3em; color: #99a1ac">小操作</a> <a href="/myblog/tags/java/" style="font-size: 1.5em; color: #99a9bf">java</a> <a href="/myblog/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/" style="font-size: 1.5em; color: #99a9bf">计算机基础</a> <a href="/myblog/tags/%E5%AE%9E%E6%88%98/" style="font-size: 1.4em; color: #99a5b6">实战</a> <a href="/myblog/tags/HTML/" style="font-size: 1.3em; color: #99a1ac">HTML</a> <a href="/myblog/tags/reg/" style="font-size: 1.2em; color: #999da3">reg</a> <a href="/myblog/tags/%E5%89%8D%E7%AB%AF%E7%9F%A5%E8%AF%86/" style="font-size: 1.2em; color: #999da3">前端知识</a> <a href="/myblog/tags/markDown/" style="font-size: 1.2em; color: #999da3">markDown</a> <a href="/myblog/tags/python/" style="font-size: 1.1em; color: #999">python</a> <a href="/myblog/tags/linux/" style="font-size: 1.1em; color: #999">linux</a> <a href="/myblog/tags/springBoot/" style="font-size: 1.2em; color: #999da3">springBoot</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/myblog/archives/2023/09/"><span class="card-archive-list-date">九月 2023</span><span class="card-archive-list-count">5</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/myblog/archives/2023/08/"><span class="card-archive-list-date">八月 2023</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/myblog/archives/2019/12/"><span class="card-archive-list-date">十二月 2019</span><span class="card-archive-list-count">11</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/myblog/archives/2019/11/"><span class="card-archive-list-date">十一月 2019</span><span class="card-archive-list-count">27</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/myblog/archives/2019/10/"><span class="card-archive-list-date">十月 2019</span><span class="card-archive-list-count">13</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">57</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2023-09-15T07:58:16.468Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By brad 随风起舞</div><div class="framework-info"><span>框架 </span><a href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/myblog/js/utils.js"></script><script src="/myblog/js/main.js"></script><script src="/myblog/js/fancybox.umd.js"></script><div class="js-pjax"></div><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div class="no-result" id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/myblog/js/search/local-search.js"></script></div></div></body></html>